package cn.net.qinling.xmlaccess;

import java.util.HashSet;
import java.util.Set;
import java.util.TimerTask;

public class CollectStatusTask extends TimerTask {

	private Set<StatusReporter> reporterSet = new HashSet<StatusReporter>();
	
	public void registerStatusReporter(StatusReporter sr) {
		reporterSet.add(sr);
	}

	@Override
	public void run() {
		for (StatusReporter sr : reporterSet) {
			sr.report();
		}
		
	}

}
